[1기-김동섭] [3주차] 바우처 관리 Command-line Application#7
Closed
dongsubkim wants to merge 5 commits into1p/#1_dongsubkimfrom
Closed
[1기-김동섭] [3주차] 바우처 관리 Command-line Application#7dongsubkim wants to merge 5 commits into1p/#1_dongsubkimfrom
dongsubkim wants to merge 5 commits into1p/#1_dongsubkimfrom
Conversation
dongsubkim
commented
Aug 17, 2021
| } | ||
| } | ||
|
|
||
| private long parseLong(String value) { |
Author
There was a problem hiding this comment.
parseLong 메소드가 VoucherProgram안에 들어가는게 나을 지, Console클래스 안에 들어가는 게 나을 지 모르겠습니다.
Author
There was a problem hiding this comment.
고민해 봤는데 그냥 Utils라는 클래스를 만들어 static method로 구현해서 가져다 쓰는게 좋을 거 같아서 다음 과제부터 반영하려 합니다..
dongsubkim
commented
Aug 17, 2021
| return voucherRepository.findAll(); | ||
| } | ||
|
|
||
| public boolean checkValidity(String type, long value) { |
Author
There was a problem hiding this comment.
인풋으로 들어온 type과 value가 올바른 형태인지 확인하는 코드인데, 이게 VoucherService 클래스 내에서 해야 하는 작업인지, 아니면 VoucherProgram에서 넘겨 주기 전에 확인을 하고 올바른 경우에만 넘겨 주는 게 맞는 지 궁금합니다.
dongsubkim
commented
Aug 18, 2021
| return Optional.of(new PercentDiscountVoucher(UUID.randomUUID(), value)); | ||
| } else { | ||
| throw new RuntimeException(MessageFormat.format("Invalid type of voucher: {0}", type)); | ||
| } |
Author
There was a problem hiding this comment.
여러 타입의 Voucher 객체들을 생성해야 하는데 어떤 방식으로 구현해 맞는 지 확신이 없습니다. 앞으로 Voucher 타입이 추가 되면, if-else-if 문이 계속 추가가 될텐데, factory 클래스 같은걸 만들어야 할까요?
46aaf32 to
ef9d24d
Compare
kimziou77
added a commit
to kimziou77/springboot-basic
that referenced
this pull request
Apr 11, 2022
* On branch : develop
# 유저 생성 : UserFactory
# 유저 저장 : UserRepository
# 유저 타입 : UserType
* Changes to be committed:
Modified : User.java, UserFactory.java, UserFileRepository.java, UserType.java
kimziou77
added a commit
to kimziou77/springboot-basic
that referenced
this pull request
Apr 11, 2022
* On branch : develop
# CSV 파일 읽기 : CSVReader
# CSV 파일 쓰기 : CSVWriter
# 샘플 CSV 파일 : user_allList, user_blackList
* Changes to be committed:
Modified : CSVReader.java, CSVWriter.java, sample.csv
kimziou77
added a commit
to kimziou77/springboot-basic
that referenced
this pull request
Apr 11, 2022
* On branch : develop
# 메모리 저장소 : UserMemoryRepository
# 파일 저장소 : UserFileRepository
* Changes to be committed:
Modified : UserMemoryRepository.java, UserFileRepository.java
moosongsong
added a commit
that referenced
this pull request
Apr 24, 2022
(BASIC-007) 바우처 삭제 테스트 코드 추가
zxcv9203
added a commit
that referenced
this pull request
Jun 18, 2022
feat : Implementation of receiving customer data from the console
hseong3243
added a commit
that referenced
this pull request
Jul 5, 2023
young970
added a commit
that referenced
this pull request
Jul 22, 2023
refactor: JdbcVoucherRepository sql문 분리
ASak1104
added a commit
to ASak1104/voucher-management-system
that referenced
this pull request
Oct 17, 2023
################ # <타입> : <제목> 의 형식으로 제목을 아래 공백줄에 작성 # 제목은 50자 이내 / 변경사항이 "무엇"인지 명확히 작성 / 끝에 마침표 금지 # 예) feat : 로그인 기능 추가 # 바로 아래 공백은 지우지 마세요 (제목과 본문의 분리를 위함) ################ # 본문(구체적인 내용)을 아랫줄에 작성 # 여러 줄의 메시지를 작성할 땐 "-"로 구분 (한 줄은 72자 이내) ################ # 꼬릿말(footer)을 아랫줄에 작성 (현재 커밋과 관련된 이슈 번호 추가 등) # 예) Close prgrms-be-devcourse#7 ################ # feat : 새로운 기능 추가 # fix : 버그 수정 # docs : 문서 수정 # test : 테스트 코드 추가 # refact : 코드 리팩토링 # style : 코드 의미에 영향을 주지 않는 변경사항 # chore : 빌드 부분 혹은 패키지 매니저 수정사항 ################
ASak1104
added a commit
to ASak1104/voucher-management-system
that referenced
this pull request
Oct 17, 2023
################ # <타입> : <제목> 의 형식으로 제목을 아래 공백줄에 작성 # 제목은 50자 이내 / 변경사항이 "무엇"인지 명확히 작성 / 끝에 마침표 금지 # 예) feat : 로그인 기능 추가 # 바로 아래 공백은 지우지 마세요 (제목과 본문의 분리를 위함) ################ # 본문(구체적인 내용)을 아랫줄에 작성 # 여러 줄의 메시지를 작성할 땐 "-"로 구분 (한 줄은 72자 이내) ################ # 꼬릿말(footer)을 아랫줄에 작성 (현재 커밋과 관련된 이슈 번호 추가 등) # 예) Close prgrms-be-devcourse#7 ################ # feat : 새로운 기능 추가 # fix : 버그 수정 # docs : 문서 수정 # test : 테스트 코드 추가 # refact : 코드 리팩토링 # style : 코드 의미에 영향을 주지 않는 변경사항 # chore : 빌드 부분 혹은 패키지 매니저 수정사항 ################
ksy90101
pushed a commit
that referenced
this pull request
Oct 23, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📌 과제 설명
👩💻 요구 사항과 구현 내용
createlistexit✅ PR 포인트 & 궁금한 점
io폴더 내의Console, Input, Outputrepository폴더 내의InMemeoryRepository를 추가하고VoucherRepository를 변형했습니다.service폴더 내의VoucherService를 변형했습니다.VoucherProgram,CommandLineApplication,VoucherType